<template>
    <Head>
        <Title>Checkout</Title>
    </Head>
    <PageHeader title="Checkout" subtitle="Checkout" :image="`${$config.public.baseUrl}images/bg/home1/2.png`"/>
    <section class="checkout padding-top padding-bottom">
        <div class="container">
            <div class="checkout__wrapper">
                <form action="#" class="checkout__form">
                    <div class="row g-5">
                        <div class="col-lg-8">
                            <CheckoutForm />
                        </div>
                        <div class="col-lg-4">
                            <OrderSummary :cartList="cartList" />
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
</template>

<script>
import PageHeader from '@/components/partials/PageHeader.vue'
import CheckoutForm from '@/components/modules/checkout/CheckoutForm.vue'
import OrderSummary from '@/components/modules/checkout/OrderSummary.vue'
export default {
    scrollToTop: true,
    components: { CheckoutForm, OrderSummary, PageHeader },
    async setup() {
        const { axios } = fetchData()
        const order = await axios.get('/order.json')
        const cartList = order.data.cartList
        return {
            cartList
        }
    },
}
</script>

<style></style>